M.define(function (helloWorld, motorJobs) {

    var self ;
    var child ;
    var batch = motorJobs.act("batch");

    return {
        __init__: function (node) {
            self = node;
            child = self.child("world");
        },
      hello: function (sleep) {
          var act = helloWorld.act("world", sleep);
          var act1 = helloWorld.act("world", sleep);

          var res = batch.call([act, act1]).then(function (f, f1) {

              var a = f.get(), a1 = f1.get();

              return "hello "+ a +"  批处理数量 "+ 2 ;
          });


          return res;
      },
      hello_native: function (sleep, times) {

          var str = child.world(sleep);

          return "hello "+ str +"  "+ times;
      }
    }
})